package org.jackysoft.struts2.fileserver;

import java.util.Collection;

import javax.annotation.Resource;

import org.apache.struts2.convention.annotation.Namespace;
import org.jackysoft.annotations.Logger;
import org.jackysoft.entity.Folder;
import org.jackysoft.service.FolderService;
import org.jackysoft.struts2.UtilsCRUDAction;
import org.jackysoft.util.OperationType;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;


@Namespace("/fileserver/file")
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
@Logger(label="文件夹",logType=OperationType.User)
public class FolderAction 
extends UtilsCRUDAction<Folder>{

	/**
	 * 
	 */
	private static final long serialVersionUID = -4003699296139824104L;
	private FolderService service;
	private Collection<Folder> beans;
	private Folder bean;
			

	public String myfolder()throws Exception{
		beans = service.getsbyParent(bean);	
		
		return "myfolder";
	}	
		
	@Resource
	public void setService(FolderService folderService) {
		this.service = folderService;
		this.setDataProvider(folderService);
	}
	public FolderService getFolderService() {
		return service;
	}


	public void setBeans(Collection<Folder> beans) {
		this.beans = beans;
	}


	public Collection<Folder> getBeans() {
		return beans;
	}


	public Folder getBean() {
		return bean;
	}


	public void setBean(Folder bean) {
		this.bean = bean;
	}
	
}